﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2021_5_21
{
    public enum foodType
    { 
        炒菜 = 1,
        炖菜,
        凉拌,
        清蒸,
        红烧
    }
    abstract class Robot
    {
        protected string name;
        public abstract void Wroking();
    }
    #region 传菜机器人
    class DeliveryBot : Robot
    {
        int hours;
        public override void Wroking()
        {
            Console.WriteLine("拿起菜,走到位置，放下菜，走了。");
        }
    }
    #endregion
    #region 炒菜机器人
    class CookRobot : Robot
    {
        public foodType foodType;

        public CookRobot()
        {
            this.name = "cookRobot";
        }

        public override void Wroking()
        {
            Console.WriteLine("请选择菜的类型 1、炒菜 2、炖菜 3、凉拌 4、清蒸 5、红烧");
            int action = int.Parse(Console.ReadLine());
            switch (action)
            {
                case 1:
                    this.foodType = foodType.炒菜;
                    break;
                case 2:
                    this.foodType = foodType.炖菜;
                    break;
                case 3:
                    this.foodType = foodType.凉拌;
                    break;
                case 4:
                    this.foodType = foodType.清蒸;
                    break;
                case 5:
                    this.foodType = foodType.红烧;
                    break;
                default:
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("输入有误！");
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    break;
            }
            if (foodType != 0)
            {
                Console.WriteLine("正在{0}中\n{0}结束。", this.foodType);
            }
            else 
            {
                Wroking();
            }
        }
    }
    #endregion
}
